Block based transform coding is the most popular approach for image and video coding. Most of the current image and video coding standards, such as JPEG, H.26x, and MPEG, make use of the block based discrete cosine transform. Generally this transform is applied on blocks of size 8×8; in H.264 this transform is applied on blocks of size 4×4 (the minimum size). In the decoder, the quantized transform coefficients are de-quantized and inverse transformed to recover the original image. So at low bitrate image and video coding blocking artifacts of size 8×8 or 4×4, or integral multiple of these sizes can be expected.
But in practice the blocking artifact sizes may change because of spatial scaling and also deviation in blocking grid might occur. So without detecting the exact blocking artifact size and grid position, blockiness metrics might turn out to be useless, as blockiness is calculated at wrong pixel positions and with wrong blocking artifact size. So the proper blockiness metrics should find the blocking artifact size and offsets before calculating the blockiness score.
A need remains for a way to address these and other problems associated with the prior art.